package com.jrx.anytxn.investor.mapper.ext;

import com.jrx.anytxn.investor.entity.TlFundRestraintLog;
import com.jrx.anytxn.investor.mapper.base.TlFundRestraintLogMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 资金限制流水mapper扩展
 *
 * @author liuyang
 * @date  2020-06-05
 **/
public interface ExtTlFundRestraintLogMapper extends TlFundRestraintLogMapper {

    /**
     * 批量插入资金限制流水
     *
     * @param fundRestraintLogs 资金限制流水
     * @return int 插入条数
     * @author liuyang
     * @date  2020-06-05
     */
    int batchInsert(List<TlFundRestraintLog> fundRestraintLogs);

    /**
     * 根据贷款流水号，客户号，出资方id查询资金限制流水
     *
     * @param loanSeqNo 贷款流水号
     * @param customerId 客户号
     * @param investorIds 出资方ID
     * @param tenantId 租户ID
     * @param fundId 资金源id
     * @param restraintStatus 限制状态
     * @return List<TlFundRestraintLog> 资金限制流水
     * @author liuyang
     * @date  2020-06-16
     */
    List<TlFundRestraintLog> selectByLoanSeqNoInvestorId(@Param("loanSeqNo") String loanSeqNo, @Param("customerId") String customerId, @Param("investorIds") Set<String> investorIds, @Param("tenantId") String tenantId, @Param("fundId") String fundId, @Param("restraintStatus") String restraintStatus);


    /**
     * 批量更新资金限制流水
     *
     * @param fundRestraintLogs 资金限制流水
     * @return int 更新条数
     * @author liuyang
     * @date  2020-06-16
     */
    int batchUpdate(List<TlFundRestraintLog> fundRestraintLogs);
}